package io.robot.controller;

import com.google.common.collect.Lists;
import io.robot.service.WxChatBootService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/wx/robot")
public class WxController {

    @Autowired
    private WxChatBootService wxChatBootService;

    @GetMapping("start")
    public void start() {
        wxChatBootService.start();
    }


    @GetMapping("logout")
    public void logout() {
        wxChatBootService.api().logout();
    }

    @PostMapping("chat/room")
    public void createChatRoom(@RequestParam("topic") String topic) {
        wxChatBootService.api().createChatRoom(topic, Lists.newArrayList());
    }

    @GetMapping("con")
    public void getCon(@RequestParam("topic") String topic) {
        wxChatBootService.api()
    }

}
